package com.eden.illness.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

public class GraphColumnar implements Comparable<GraphColumnar>{

    //疫区
    private String area;
    //境外输入
    private int fromAbroad;

    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }

    public int getFromAbroad() {
        return fromAbroad;
    }

    public void setFromAbroad(int fromAbroad) {
        this.fromAbroad = fromAbroad;
    }

    public GraphColumnar() {
        super();
    }

    public GraphColumnar(String area, int fromAbroad) {
        this.area = area;
        this.fromAbroad = fromAbroad;
    }

    @Override
    public int compareTo(GraphColumnar columnar) {
        return columnar.getFromAbroad() - this.getFromAbroad();
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("area", getArea())
                .append("fromAbroad", getFromAbroad())
                .toString();

    }
}
